package com.sky.mapper;

import com.sky.entity.Dish;
import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {

    /**
     * 新增菜品口味集合，批量新增
     * @param
     */
    void insertDishFlavorList(List<DishFlavor> dishFlavorList);

    /**
     * 根据菜品id集合删除口味表
     * @param dishIds
     */
    public int deleteDishFlavor(List<Long> dishIds);

    /**
     * 根据菜品id查询口味列表
     * @param dishId
     * @return
     */
    @Select("select * from dish_flavor where dish_id=#{dishId}")
    public List<DishFlavor> getDishFalvorListById(Long dishId);

}
